import yagmail

def send_mail(subject,filename):
    send=yagmail.SMTP(user='chenzw3013@qq.com',password='yzkuylhvhxvudacd',host='smtp.qq.com')
    send.send(to='chenzw3013@qq.com',subject=subject,contents='请查收',attachments=filename)
    print("发送成功！")